#include<stdio.h>
void nizhi(int arr[],int i,int j)
{
        while(i<j)
        {
            int temp = arr[i];
            arr[i] = arr[j];
            arr[j] = temp;
            i++;
            j--;
        }

}
int main()
{
    int T;
    scanf("%d",&T);
    for(int t = 0;t < T;t++)
    {
        int n,i,j;
        scanf("%d %d %d",&n,&i,&j);
        int arr[n];
        for(int k = 0;k < n;k++)
        {
            scanf("%d",&arr[k]);
        }
            nizhi(arr,i-1,j-1);
            for(int k = 0;k < n;k++)
            {
                if(k == 0)
                printf("%d",arr[k]);
                else if(k>0)
                printf(" %d",arr[k]);
            }
        printf("\n");
    }
    return 0;
}
